package opencv.core;

import opencv.utils.InitUtils;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;

/**
 * https://blog.csdn.net/weixin_42142612/article/details/100919691
 */
public class Main {

    /**
     *自动添加动态库
     * @param args
     */
    public static void main(String[] args) {
        InitUtils.addLibrary();
        System.out.println("opencv\n"+System.getProperty("java.library.path"));
        System.out.println("Welcome to OpenCV " + Core.VERSION);
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
        Mat m  = Mat.eye(3, 3, CvType.CV_8UC1);
        System.out.println("m = " + m.dump());
    }


}
